package com.yanqu.road.server.cmd.systemgroup.newmonopolymkt;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.cmd.CrossAppointCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.systemgroup.newmonopolymkt.CrossNewMonopolyMarketGroup;
import com.yanqu.road.server.manager.systemgroup.newmonopolymkt.CrossNewMonopolyMarketMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_CROSS_NEW_MONOPOLY_MARKET_SYNC_CONFIG, desc = "")
public class NewMonopolyMarketBaseConfigSyncCmd extends CrossAppointCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

        CrossNewMonopolyMarketGroup monopolyMarket = CrossNewMonopolyMarketMgr.getMarket(groupId);
        if(monopolyMarket != null){
            monopolyMarket.syncConfig(serverId, packet.getPlayerId());
        }
    }

    @Override
    public void sendData() {

    }
}
